const defaultState = {
    account:'',
    loginStatus:false,

};
export default (state = defaultState,action)=>{
    switch(action.type){
        case 'LOGIN':
            console.log("action.data",action.data)
            console.log("action",action)
            if(action.values.remember)
                return{ ...state,loginStatus:action.result.isLogin,account:action.values.account}
            return {...state,loginStatus:action.data}
        case 'LOGOUT':
            return{ ...state,loginStatus:false }
        default:
            return { ...state }
    }
};



